<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <title>Title</title>
  <style>
    body{
      margin: 0;
    }
    #box{
      width: 100vw;
      height: 100vh;
    }
  </style>
</head>
<body>
<div id="box">
  <input type="text">

  <div style="height: 3300px"></div>

  <div id="son">son</div>
</div>
<script>
  // 键盘
  window.addEventListener('keydown',(e)=>{
    console.log('keydown e:',e)
    const data = {
      keyCode: e.keyCode,
      shift: e.shiftKey,
      meta: e.metaKey,
      control: e.ctrlKey,
      alt: e.altKey
    };
    console.log('有用的修饰符:',data);
  })
</script>
</body>
</html>
